package cn.fscode.code.generator.service;

import cn.fscode.code.generator.gen.TableDefinition;
import cn.fscode.code.generator.model.po.DatasourceConfigPO;
import cn.fscode.code.generator.model.req.DatasourceConfigQueryReq;
import cn.fscode.code.generator.model.req.DbTableReq;
import cn.fscode.code.generator.model.resp.DatasourceResp;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * @author shenguangyang
 */
public interface DatasourceConfigService {
    DatasourceConfigPO getById(Long id);

    List<DatasourceResp> listAll();

    void save(DatasourceConfigPO datasourceConfigPO);

    void update(DatasourceConfigPO datasourceConfigPO);

    void delete(DatasourceConfigPO datasourceConfigPO);

    IPage<DatasourceConfigPO> page(DatasourceConfigQueryReq req);

    List<TableDefinition> listTable(DbTableReq req);

    void deleteBatchByIds(List<Long> ids);
}
